﻿namespace Strom.Core.Config
{
    class ConfigVariable
    {
        public string Name { get; private set; }
        public string Type { get; private set; }
        public string Value { get; set; }

        public ConfigVariable(string name, string type, object value)
        {
            Name = name;
            Type = type;

            if (type == typeof(string).ToString())
                Value = (string)value;
            else if (type == typeof(int).ToString())
                Value = ((int)value).ToString();
            else if (type == typeof(long).ToString())
                Value = ((long)value).ToString();
            else if (type == typeof(short).ToString())
                Value = ((short)value).ToString();
            else if (type == typeof(byte).ToString())
                Value = ((byte)value).ToString();
            else
                Value = "INVALID_TYPE";
        }
    }
}
